<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <h2>测试put请求与delete请求</h2>


    <form action="${pageContext.request.contextPath}/user" method="post">
        用户名：<input type="text" name="username"> <br>
        <%--实现PUT请求的关键,name属性值固定,value指定请求方式--%>
        <input type="hidden" name="_method" value="PUT"><br>
        <input type="submit" value="submit"><br>
    </form>


    <form action="${pageContext.request.contextPath}/user/9" method="post">
        <input type="hidden" name="_method" value="DELETE"><br>
        <input type="submit" value="submit"><br>
    </form>

</head>
<body>

